package net.homeftp.heimo;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

import com.anupcowkur.wheelmenu.WheelMenu;

public class WheelMenuActivity extends Activity{
	private WheelMenu wheelMenu;
	private static final String TAG = "WheelMenuActivity";

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.wheel_menu_view);
		init();
	}

	private void init() {
		wheelMenu = (WheelMenu) findViewById(R.id.wheelMenu);

		//set the no of divisions in the wheel, default is 1
		wheelMenu.setDivCount(12);

		//set the drawable to be used as the wheel image. If you
		//don't set this, you'll get a  NullPointerException.
		wheelMenu.setWheelImage(R.drawable.wheel);
		
		wheelMenu.setWheelChangeListener(new WheelMenu.WheelChangeListener() {
			@Override
			public void onSelectionChange(int selectedPosition) {
			      Log.d(TAG, "Wheel Selected pos : "+selectedPosition);
			    }
			});
	}
}